.class final Lcom/ninesky/browser/bh;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field private a:Landroid/os/Message;

.field private synthetic b:Lcom/ninesky/browser/AddBookmarkActivity;


# direct methods
.method public constructor <init>(Lcom/ninesky/browser/AddBookmarkActivity;Landroid/os/Message;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/bh;->b:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p2, p0, Lcom/ninesky/browser/bh;->a:Landroid/os/Message;

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 8

    const/4 v7, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/bh;->a:Landroid/os/Message;

    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "title"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const-string v1, "url"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v1, "tags"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v1, "invalidateThumbnail"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    const-string v1, "touch_icon_url"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    :try_start_0
    iget-object v0, p0, Lcom/ninesky/browser/bh;->b:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-virtual {v0}, Lcom/ninesky/browser/AddBookmarkActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const/4 v0, 0x0

    iget-object v5, p0, Lcom/ninesky/browser/bh;->b:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v5}, Lcom/ninesky/browser/AddBookmarkActivity;->f(Lcom/ninesky/browser/AddBookmarkActivity;)I

    move-result v5

    invoke-static/range {v0 .. v5}, Lcom/ninesky/browser/provider/b;->a(Landroid/content/Context;Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    if-eqz v6, :cond_0

    new-instance v0, Lcom/ninesky/browser/ck;

    invoke-direct {v0, v1, v2}, Lcom/ninesky/browser/ck;-><init>(Landroid/content/ContentResolver;Ljava/lang/String;)V

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/String;

    const/4 v2, 0x0

    iget-object v3, p0, Lcom/ninesky/browser/bh;->b:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v3}, Lcom/ninesky/browser/AddBookmarkActivity;->g(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/ck;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/bh;->a:Landroid/os/Message;

    const/4 v1, 0x1

    iput v1, v0, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/ninesky/browser/bh;->a:Landroid/os/Message;

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    return-void

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/ninesky/browser/bh;->a:Landroid/os/Message;

    iput v7, v0, Landroid/os/Message;->arg1:I

    goto :goto_0
.end method
